/**
 * 文档管理路由配置
 * Phase 1: 前端 MVP 使用
 */

import React from 'react';
import { Routes, Route, Navigate } from 'react-router-dom';
import DocListPage from './doc-list-page';
import DocDetailPage from './doc-detail-page';
import DocEditorPage from './doc-editor-page';
import DocFileManagerPage from './doc-file-manager-page';

const DocRouting = () => (
  <Routes>
    <Route index element={<DocListPage />} />
    <Route path="files" element={<DocFileManagerPage />} />
    <Route path="new" element={<DocEditorPage />} />
    <Route path="edit/:id" element={<DocEditorPage />} />
    <Route path=":slug" element={<DocDetailPage />} />
    <Route path="*" element={<Navigate to="." replace />} />
  </Routes>
);

export default DocRouting;

